﻿using System.Xml.Serialization;

namespace HamcoWcs.Models.TibcoMessage
{

    [XmlRoot("MESSAGE")]
    public class PortStateChangedMessage : BaseTibcoMessage<PortStateChangedMessageBody>
    {
        public PortStateChangedMessage()
        {

        }
        public PortStateChangedMessage(PortStateChangedMessageBody body, string inboxName = "", string listener = "") : base("PortStateChanged", body, inboxName, listener)
        {
        }
    }


    public class PortStateChangedMessageBody : MachineEventBase
    {
        public PortStateChangedMessageBody()
        {
        }

        public PortStateChangedMessageBody(string machineName, string portName, string portState)
        {
            MachineName = machineName;
            PortName = portName;
            PortState = portState;
            EventUser = machineName;
        }

        [XmlElement("PORTSTATE")]
        public string PortState { get; set; }

    }
}
